#ifndef _QIO_H
#define _QIO_H

#include <stdio.h>

#define endln 	"\n"

class Qio
{
  protected:
    FILE* handle;
  public:
    Qio(FILE* h):handle(h) {}
    Qio operator<<(char* s) { fputs(s,handle); return *this; }
    //Qio operator<<(char c) { fputc(c,handle); return *this; }
    Qio operator<<(long l) { fprintf(handle,"%ld",l); return *this; }
    void sethandle(FILE* h) { handle=h; }
};

extern Qio QIO;
extern Qio QERR;
extern Qio QFILE;

#endif